DE 198 18 596 C5 discloses a method for operating a petrol engine, by means of which operation of the petrol engine with compression ignition in a part-load range is regulated. In this case, in a compression-ignition mode, a specific exhaust-gas quantity is retained in the combustion space and compressed, a fuel quantity being injected into the compressed exhaust-gas quantity before a supply of fresh air is started. In this case, the retained exhaust-gas quantity is regulated with the aid of an exhaust-gas retention flap.